package com.ruoyi.apparatus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.apparatus.mapper.AlgsExperimentalApparatusMapper;
import com.ruoyi.apparatus.domain.AlgsExperimentalApparatus;
import com.ruoyi.apparatus.service.IAlgsExperimentalApparatusService;

/**
 * 实验器材Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-17
 */
@Service
public class AlgsExperimentalApparatusServiceImpl implements IAlgsExperimentalApparatusService 
{
    @Autowired
    private AlgsExperimentalApparatusMapper algsExperimentalApparatusMapper;

    /**
     * 查询实验器材
     * 
     * @param experimentalApparatusId 实验器材主键
     * @return 实验器材
     */
    @Override
    public AlgsExperimentalApparatus selectAlgsExperimentalApparatusByExperimentalApparatusId(Long experimentalApparatusId)
    {
        return algsExperimentalApparatusMapper.selectAlgsExperimentalApparatusByExperimentalApparatusId(experimentalApparatusId);
    }

    /**
     * 查询实验器材列表
     * 
     * @param algsExperimentalApparatus 实验器材
     * @return 实验器材
     */
    @Override
    public List<AlgsExperimentalApparatus> selectAlgsExperimentalApparatusList(AlgsExperimentalApparatus algsExperimentalApparatus)
    {
        return algsExperimentalApparatusMapper.selectAlgsExperimentalApparatusList(algsExperimentalApparatus);
    }

    /**
     * 新增实验器材
     * 
     * @param algsExperimentalApparatus 实验器材
     * @return 结果
     */
    @Override
    public int insertAlgsExperimentalApparatus(AlgsExperimentalApparatus algsExperimentalApparatus)
    {
        return algsExperimentalApparatusMapper.insertAlgsExperimentalApparatus(algsExperimentalApparatus);
    }

    /**
     * 修改实验器材
     * 
     * @param algsExperimentalApparatus 实验器材
     * @return 结果
     */
    @Override
    public int updateAlgsExperimentalApparatus(AlgsExperimentalApparatus algsExperimentalApparatus)
    {
        return algsExperimentalApparatusMapper.updateAlgsExperimentalApparatus(algsExperimentalApparatus);
    }

    /**
     * 批量删除实验器材
     * 
     * @param experimentalApparatusIds 需要删除的实验器材主键
     * @return 结果
     */
    @Override
    public int deleteAlgsExperimentalApparatusByExperimentalApparatusIds(Long[] experimentalApparatusIds)
    {
        return algsExperimentalApparatusMapper.deleteAlgsExperimentalApparatusByExperimentalApparatusIds(experimentalApparatusIds);
    }

    /**
     * 删除实验器材信息
     * 
     * @param experimentalApparatusId 实验器材主键
     * @return 结果
     */
    @Override
    public int deleteAlgsExperimentalApparatusByExperimentalApparatusId(Long experimentalApparatusId)
    {
        return algsExperimentalApparatusMapper.deleteAlgsExperimentalApparatusByExperimentalApparatusId(experimentalApparatusId);
    }
}
